# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=limeaide
pkgver=305.ce3c9b7
pkgrel=8
pkgdesc='Remotely dump RAM of a Linux client and create a volatility profile for later analysis on your local host.'
groups=('blackarch' 'blackarch-forensic')
arch=('any')
url='https://github.com/kd8bny/LiMEaide'
license=('GPL3')
depends=('python' 'python-paramiko' 'python-argparse' 'python-termcolor')
makedepends=('git')
source=("$pkgname::git+https://github.com/kd8bny/LiMEaide.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/$pkgname/"{logs}

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  rm README.md LICENSE

  cp -a * "$pkgdir/usr/share/$pkgname/"

  cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
cd /usr/share/$pkgname
exec python $pkgname.py "\$@"
EOF

  chmod +x "$pkgdir/usr/bin/$pkgname"
}

